package com.Poly02;

public class worker extends Employee {
    private double salary;
    private String name;
    public worker(String name, double salary) {
        super(name, salary);
        this.salary = salary;
    }
    public void work(){
        System.out.println("员工 "+getName()+" 正在工作");
    }

    @Override
    public double getAnnualSalary() {
        return super.getAnnualSalary();//因为普通员工没有其他收入，则直接调用父类方法
    }
}
